package com.lg.spring.echo;

/**
 * @author by Mr. Li 2020/9/12 16:50
 */
public class DefaultEchoService implements EchoService {

	private final String echoFormat;

	public DefaultEchoService(String echoFormat) {
		this.echoFormat = (null != echoFormat) ? echoFormat : "%s";
	}

	@Override
	public String getMessage(String message) {
		return String.format(this.echoFormat, message);
	}
}
